<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of demnlab</title>
  <meta name="keywords" content="demnlab">
  <meta name="description" content="DEMNLAB A front-end Graphical User Interface to the demos">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">netlab</a> &gt; demnlab.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\netlab&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>demnlab
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>DEMNLAB A front-end Graphical User Interface to the demos</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function demnlab(action); </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">DEMNLAB A front-end Graphical User Interface to the demos

    Description
    This function will start a user interface allowing the user to select
    different demonstration functions to view. The demos are divided into
    4 groups, with the demo being executed by selecting the desired
    option from a pop-up menu.

    See also</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="demard.html" class="code" title="">demard</a>	DEMARD	Automatic relevance determination using the MLP.</li><li><a href="demev1.html" class="code" title="">demev1</a>	DEMEV1	Demonstrate Bayesian regression for the MLP.</li><li><a href="demev2.html" class="code" title="">demev2</a>	DEMEV2	Demonstrate Bayesian classification for the MLP.</li><li><a href="demev3.html" class="code" title="">demev3</a>	DEMEV3	Demonstrate Bayesian regression for the RBF.</li><li><a href="demgauss.html" class="code" title="">demgauss</a>	DEMGAUSS Demonstrate sampling from Gaussian distributions.</li><li><a href="demglm1.html" class="code" title="">demglm1</a>	DEMGLM1 Demonstrate simple classification using a generalized linear model.</li><li><a href="demglm2.html" class="code" title="">demglm2</a>	DEMGLM2 Demonstrate simple classification using a generalized linear model.</li><li><a href="demgmm1.html" class="code" title="">demgmm1</a>	DEMGMM1 Demonstrate EM for Gaussian mixtures.</li><li><a href="demgmm2.html" class="code" title="">demgmm2</a>	DEMGMM1 Demonstrate density modelling with a Gaussian mixture model.</li><li><a href="demgmm3.html" class="code" title="">demgmm3</a>	DEMGMM3 Demonstrate density modelling with a Gaussian mixture model.</li><li><a href="demgmm4.html" class="code" title="">demgmm4</a>	DEMGMM4 Demonstrate density modelling with a Gaussian mixture model.</li><li><a href="demgp.html" class="code" title="">demgp</a>	DEMGP	Demonstrate simple regression using a Gaussian Process.</li><li><a href="demgpard.html" class="code" title="">demgpard</a>	DEMGPARD Demonstrate ARD using a Gaussian Process.</li><li><a href="demgtm1.html" class="code" title="">demgtm1</a>	DEMGTM1 Demonstrate EM for GTM.</li><li><a href="demgtm2.html" class="code" title="">demgtm2</a>	DEMGTM2 Demonstrate GTM for visualisation.</li><li><a href="demhint.html" class="code" title="function demhint(nin, nhidden, nout)">demhint</a>	DEMHINT Demonstration of Hinton diagram for 2-layer feed-forward network.</li><li><a href="demhmc1.html" class="code" title="">demhmc1</a>	DEMHMC1 Demonstrate Hybrid Monte Carlo sampling on mixture of two Gaussians.</li><li><a href="demhmc2.html" class="code" title="">demhmc2</a>	DEMHMC2 Demonstrate Bayesian regression with Hybrid Monte Carlo sampling.</li><li><a href="demhmc3.html" class="code" title="">demhmc3</a>	DEMHMC3 Demonstrate Bayesian regression with Hybrid Monte Carlo sampling.</li><li><a href="demkmn1.html" class="code" title="">demkmn1</a>	DEMKMEAN Demonstrate simple clustering model trained with K-means.</li><li><a href="demknn1.html" class="code" title="">demknn1</a>	DEMKNN1 Demonstrate nearest neighbour classifier.</li><li><a href="demmdn1.html" class="code" title="">demmdn1</a>	DEMMDN1 Demonstrate fitting a multi-valued function using a Mixture Density Network.</li><li><a href="demmet1.html" class="code" title="function demmet1(plot_wait)">demmet1</a>	DEMMET1 Demonstrate Markov Chain Monte Carlo sampling on a Gaussian.</li><li><a href="demmlp1.html" class="code" title="">demmlp1</a>	DEMMLP1 Demonstrate simple regression using a multi-layer perceptron</li><li><a href="demmlp2.html" class="code" title="">demmlp2</a>	DEMMLP2 Demonstrate simple classification using a multi-layer perceptron</li><li><a href="demns1.html" class="code" title="">demns1</a>	DEMNS1	Demonstrate Neuroscale for visualisation.</li><li><a href="demolgd1.html" class="code" title="">demolgd1</a>	DEMOLGD1 Demonstrate simple MLP optimisation with on-line gradient descent</li><li><a href="demopt1.html" class="code" title="function demopt1(xinit)">demopt1</a>	DEMOPT1 Demonstrate different optimisers on Rosenbrock's function.</li><li><a href="demprgp.html" class="code" title="function demprgp(action);">demprgp</a>	DEMPRGP Demonstrate sampling from a Gaussian Process prior.</li><li><a href="demprior.html" class="code" title="function demprior(action);">demprior</a>	DEMPRIOR Demonstrate sampling from a multi-parameter Gaussian prior.</li><li><a href="demrbf1.html" class="code" title="">demrbf1</a>	DEMRBF1 Demonstrate simple regression using a radial basis function network.</li><li><a href="demsom1.html" class="code" title="">demsom1</a>	DEMSOM1 Demonstrate SOM for visualisation.</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function demnlab(action);</a>
0002 <span class="comment">%DEMNLAB A front-end Graphical User Interface to the demos</span>
0003 <span class="comment">%</span>
0004 <span class="comment">%    Description</span>
0005 <span class="comment">%    This function will start a user interface allowing the user to select</span>
0006 <span class="comment">%    different demonstration functions to view. The demos are divided into</span>
0007 <span class="comment">%    4 groups, with the demo being executed by selecting the desired</span>
0008 <span class="comment">%    option from a pop-up menu.</span>
0009 <span class="comment">%</span>
0010 <span class="comment">%    See also</span>
0011 <span class="comment">%</span>
0012 
0013 <span class="comment">%    Copyright (c) Ian T Nabney (1996-2001)</span>
0014 
0015 <span class="comment">% If run without parameters, initialise gui.</span>
0016 <span class="keyword">if</span> nargin&lt;1,
0017     action=<span class="string">'initialise'</span>;
0018 <span class="keyword">end</span>;
0019 
0020 <span class="keyword">if</span> strcmp(action,<span class="string">'initialise'</span>),
0021 
0022   <span class="comment">% Create figure</span>
0023   fig = figure( <span class="keyword">...</span>
0024     <span class="string">'Name'</span>, <span class="string">'Netlab Demos'</span>, <span class="keyword">...</span>
0025     <span class="string">'NumberTitle'</span>, <span class="string">'off'</span>, <span class="keyword">...</span>
0026     <span class="string">'Color'</span>, [0.7529 0.7529 0.7529], <span class="keyword">...</span>
0027     <span class="string">'Visible'</span>, <span class="string">'on'</span>);
0028   
0029   <span class="comment">% Create GROUPS</span>
0030   <span class="comment">% Bottom of demo buttons</span>
0031   group1_bot = 0.20;
0032   group1_top = 0.75;
0033   uicontrol(fig, <span class="keyword">...</span>
0034     <span class="string">'Style'</span>, <span class="string">'frame'</span>, <span class="keyword">...</span>
0035     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0036     <span class="string">'Position'</span>, [0.03 group1_bot 0.94 group1_top - group1_bot], <span class="keyword">...</span>
0037     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5]);
0038 
0039   <span class="comment">% Bottom of help and close buttons</span>
0040   group2_bot = 0.04;
0041   uicontrol(fig, <span class="keyword">...</span>
0042     <span class="string">'Style'</span>, <span class="string">'frame'</span>, <span class="keyword">...</span>
0043     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0044     <span class="string">'Position'</span>, [0.03 group2_bot 0.94 0.12], <span class="keyword">...</span>
0045     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5]);
0046 
0047   <span class="comment">% Draw title</span>
0048   hLogoAxis = axes( <span class="keyword">...</span>
0049     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0050     <span class="string">'Position'</span>, [0.05 0.82 0.90 0.14], <span class="keyword">...</span>
0051     <span class="string">'Box'</span>, <span class="string">'off'</span>, <span class="keyword">...</span>
0052     <span class="string">'XColor'</span>, [0 0 0], <span class="keyword">...</span>
0053     <span class="string">'YColor'</span>, [0 0 0], <span class="keyword">...</span>
0054     <span class="string">'Visible'</span>, <span class="string">'on'</span>);
0055 
0056   load netlogo;            <span class="comment">% load image and colour map</span>
0057   colormap(netcmap(1:3,:));    <span class="comment">% change colour map: don't need many entries</span>
0058   image(nlogo);            <span class="comment">% draw logo</span>
0059   axis(<span class="string">'image'</span>);        <span class="comment">% ensures pixels on axis are square</span>
0060   axis off;            <span class="comment">% turn axes off</span>
0061 
0062   <span class="comment">% Create static text</span>
0063   uicontrol(fig, <span class="keyword">...</span>
0064     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0065     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0066     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0067     <span class="string">'Position'</span>, [0.05 group1_top-0.1 0.90 0.08], <span class="keyword">...</span>
0068     <span class="string">'String'</span>, <span class="string">'Select demo to run:'</span>);
0069 
0070   <span class="comment">% First row text offset</span>
0071   tRow1Offset = 0.14;
0072   <span class="comment">% Offset between text and button</span>
0073   TBoffset = 0.07;
0074   <span class="comment">% First row button offset</span>
0075   bRow1Offset = tRow1Offset+TBoffset;
0076   <span class="comment">% ONE text</span>
0077   uicontrol(fig, <span class="keyword">...</span>
0078     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0079     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0080     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0081     <span class="string">'Position'</span>, [0.08 group1_top-tRow1Offset 0.36 0.05], <span class="keyword">...</span>
0082     <span class="string">'String'</span>, <span class="string">'Regression'</span>);
0083   
0084   popup1str(1) = {<span class="string">'Select Option'</span>};
0085   popup1str(2) = {<span class="string">'Multi-Layer Perceptron'</span>};
0086   popup1str(3) = {<span class="string">'Radial Basis Function'</span>};
0087   popup1str(4) = {<span class="string">'Mixture Density Network'</span>};
0088   <span class="comment">% ONE popup</span>
0089   hPop1 = uicontrol(fig, <span class="keyword">...</span>
0090     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0091     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0092     <span class="string">'String'</span>, popup1str, <span class="keyword">...</span>
0093     <span class="string">'Position'</span>, [0.08 group1_top-bRow1Offset 0.36 0.08], <span class="keyword">...</span>
0094     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0095     <span class="string">'Callback'</span>, <span class="string">'demnlab popup1'</span>);
0096 
0097   <span class="comment">% TWO text</span>
0098   uicontrol(fig, <span class="keyword">...</span>
0099     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0100     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0101     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0102     <span class="string">'Position'</span>, [0.56 group1_top-tRow1Offset 0.36 0.05], <span class="keyword">...</span>
0103     <span class="string">'String'</span>, <span class="string">'Classification'</span>);
0104   
0105   popup2str(1) = popup1str(1);
0106   popup2str(2) = {<span class="string">'Generalised Linear Model (2 class)'</span>};
0107   popup2str(3) = {<span class="string">'Generalised Linear Model (3 class)'</span>};
0108   popup2str(4) = {<span class="string">'Multi-Layer Perceptron'</span>};
0109   popup2str(5) = {<span class="string">'K nearest neighbour'</span>};
0110   <span class="comment">% TWO popup</span>
0111   hPop2 = uicontrol(fig, <span class="keyword">...</span>
0112     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0113     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0114     <span class="string">'String'</span>, popup2str, <span class="keyword">...</span>
0115     <span class="string">'Position'</span>, [0.56 group1_top-bRow1Offset 0.36 0.08], <span class="keyword">...</span>
0116     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0117     <span class="string">'Callback'</span>, <span class="string">'demnlab popup2'</span>);
0118   
0119   tRow2Offset = 0.30;
0120   bRow2Offset = tRow2Offset+TBoffset;
0121   <span class="comment">% THREE text</span>
0122   uicontrol(fig, <span class="keyword">...</span>
0123     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0124     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0125     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0126     <span class="string">'Position'</span>, [0.08 group1_top - tRow2Offset 0.36 0.05], <span class="keyword">...</span>
0127     <span class="string">'String'</span>, <span class="string">'Density Modelling and Clustering'</span>); 
0128   
0129   popup3str(1) = popup1str(1);
0130   popup3str(2) = {<span class="string">'Gaussian Mixture (EM training)'</span>};
0131   popup3str(3) = {<span class="string">'Gaussian Mixture (spherical)'</span>};
0132   popup3str(4) = {<span class="string">'Gaussian Mixture (diagonal)'</span>};
0133   popup3str(5) = {<span class="string">'Gaussian Mixture (full)'</span>};
0134   popup3str(6) = {<span class="string">'Neuroscale'</span>};
0135   popup3str(7) = {<span class="string">'GTM (EM training)'</span>};
0136   popup3str(8) = {<span class="string">'GTM (visualisation)'</span>};
0137   popup3str(9) = {<span class="string">'K-means clustering'</span>};
0138   popup3str(10) = {<span class="string">'Self-Organising Map'</span>};
0139   <span class="comment">% TWO popup</span>
0140   <span class="comment">% THREE popup</span>
0141   hPop3 = uicontrol(fig, <span class="keyword">...</span>
0142     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0143     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0144     <span class="string">'String'</span>, popup3str, <span class="keyword">...</span>
0145     <span class="string">'Position'</span>, [0.08 group1_top - bRow2Offset 0.36 0.08], <span class="keyword">...</span>
0146     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0147     <span class="string">'Callback'</span>, <span class="string">'demnlab popup3'</span>);
0148   
0149   <span class="comment">% FOUR text</span>
0150   uicontrol(fig, <span class="keyword">...</span>
0151     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0152     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0153     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0154     <span class="string">'Position'</span>, [0.56 group1_top - tRow2Offset 0.36 0.05], <span class="keyword">...</span>
0155     <span class="string">'String'</span>, <span class="string">'Bayesian Methods'</span>);
0156   
0157   popup4str(1) = popup1str(1);
0158   popup4str(2) = {<span class="string">'Sampling the MLP Prior'</span>};
0159   popup4str(3) = {<span class="string">'Evidence Approximation for MLP'</span>};
0160   popup4str(4) = {<span class="string">'Evidence Approximation for RBF'</span>};
0161   popup4str(5) = {<span class="string">'Evidence Approximation in Classification'</span>};
0162   popup4str(6) = {<span class="string">'ARD for MLP'</span>};
0163   popup4str(7) = {<span class="string">'Sampling the GP Prior'</span>};
0164   popup4str(8) = {<span class="string">'GPs for Regression'</span>};
0165   popup4str(9) = {<span class="string">'ARD for GP'</span>};
0166   <span class="comment">% FOUR popup</span>
0167   hPop4 = uicontrol(fig, <span class="keyword">...</span>
0168     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0169     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0170     <span class="string">'String'</span>, popup4str, <span class="keyword">...</span>
0171     <span class="string">'Position'</span>, [0.56 group1_top - bRow2Offset 0.36 0.08], <span class="keyword">...</span>
0172     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0173     <span class="string">'Callback'</span>, <span class="string">'demnlab popup4'</span>);
0174   
0175   
0176   tRow3Offset = 0.45;
0177   bRow3Offset = tRow3Offset+TBoffset;
0178   <span class="comment">% FIVE text</span>
0179   uicontrol(fig, <span class="keyword">...</span>
0180     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0181     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0182     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0183     <span class="string">'Position'</span>, [0.08 group1_top - tRow3Offset 0.36 0.05], <span class="keyword">...</span>
0184     <span class="string">'String'</span>, <span class="string">'Optimisation and Visualisation'</span>); 
0185   
0186   popup5str(1) = popup1str(1);
0187   popup5str(2) = {<span class="string">'Algorithm Comparison'</span>};
0188   popup5str(3) = {<span class="string">'On-line Gradient Descent'</span>};
0189   popup5str(4) = {<span class="string">'Hinton Diagrams'</span>};
0190   <span class="comment">% FIVE popup</span>
0191   hPop5 = uicontrol(fig, <span class="keyword">...</span>
0192     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0193     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0194     <span class="string">'String'</span>,popup5str, <span class="keyword">...</span>
0195     <span class="string">'Position'</span>, [0.08 group1_top - bRow3Offset 0.36 0.08], <span class="keyword">...</span>
0196     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0197     <span class="string">'Callback'</span>, <span class="string">'demnlab popup5'</span>);
0198   
0199   <span class="comment">% SIX text</span>
0200   uicontrol(fig, <span class="keyword">...</span>
0201     <span class="string">'Style'</span>, <span class="string">'text'</span>, <span class="keyword">...</span>
0202     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0203     <span class="string">'BackgroundColor'</span>, [0.5 0.5 0.5], <span class="keyword">...</span>
0204     <span class="string">'Position'</span>, [0.56 group1_top - tRow3Offset 0.36 0.05], <span class="keyword">...</span>
0205     <span class="string">'String'</span>, <span class="string">'Sampling'</span>);
0206   
0207   popup6str(1) = popup1str(1);
0208   popup6str(2) = {<span class="string">'Sampling a Gaussian'</span>};
0209   popup6str(3) = {<span class="string">'MCMC sampling (Metropolis)'</span>};
0210   popup6str(4) = {<span class="string">'Hybrid MC (Gaussian mixture)'</span>};
0211   popup6str(5) = {<span class="string">'Hybrid MC for MLP I'</span>};
0212   popup6str(6) = {<span class="string">'Hybrid MC for MLP II'</span>};
0213   <span class="comment">% SIX popup</span>
0214   hPop6 = uicontrol(fig, <span class="keyword">...</span>
0215     <span class="string">'Style'</span>,<span class="string">'popup'</span>, <span class="keyword">...</span>
0216     <span class="string">'Units'</span>,<span class="string">'normalized'</span>, <span class="keyword">...</span>
0217     <span class="string">'String'</span>, popup6str, <span class="keyword">...</span>
0218     <span class="string">'Position'</span>, [0.56 group1_top - bRow3Offset 0.36 0.08], <span class="keyword">...</span>
0219     <span class="string">'BackgroundColor'</span>, [0.7 0.7 0.7], <span class="keyword">...</span>
0220     <span class="string">'Callback'</span>, <span class="string">'demnlab popup6'</span>);
0221   
0222   
0223   <span class="comment">% Create HELP button</span>
0224   uicontrol(fig, <span class="keyword">...</span>
0225     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0226     <span class="string">'Position'</span> , [0.05 group2_bot+0.02 0.40 0.08], <span class="keyword">...</span>
0227     <span class="string">'String'</span>, <span class="string">'Help'</span>, <span class="keyword">...</span>
0228     <span class="string">'Callback'</span>, <span class="string">'demnlab help'</span>);
0229   
0230   <span class="comment">% Create CLOSE button</span>
0231   uicontrol(fig, <span class="keyword">...</span>
0232     <span class="string">'Units'</span>, <span class="string">'normalized'</span>, <span class="keyword">...</span>
0233     <span class="string">'Position'</span> , [0.55 group2_bot+0.02 0.40 0.08], <span class="keyword">...</span>
0234     <span class="string">'String'</span>, <span class="string">'Close'</span>, <span class="keyword">...</span>
0235     <span class="string">'Callback'</span>, <span class="string">'close(gcf)'</span>);
0236   
0237   hndlList=[fig hPop1 hPop2 hPop3 hPop4 hPop5 hPop6];
0238   set(fig, <span class="string">'UserData'</span>, hndlList);
0239   set(fig, <span class="string">'HandleVisibility'</span>, <span class="string">'callback'</span>);
0240   
0241 <span class="keyword">elseif</span> strcmp(action, <span class="string">'popup1'</span>),
0242   
0243   hndlList=get(gcf,<span class="string">'UserData'</span>);
0244   hPop = hndlList(2);
0245   
0246   selected = get(hPop, <span class="string">'Val'</span>);
0247   set(hPop, <span class="string">'Val'</span>, [1]);
0248   
0249   <span class="keyword">switch</span> selected
0250     <span class="keyword">case</span> 2
0251       <a href="demmlp1.html" class="code" title="">demmlp1</a>;
0252     <span class="keyword">case</span> 3
0253       <a href="demrbf1.html" class="code" title="">demrbf1</a>;
0254     <span class="keyword">case</span> 4
0255       <a href="demmdn1.html" class="code" title="">demmdn1</a>;
0256   <span class="keyword">end</span>;
0257   
0258 <span class="keyword">elseif</span> strcmp(action,<span class="string">'popup2'</span>),
0259   
0260   hndlList=get(gcf,<span class="string">'UserData'</span>);
0261   hPop = hndlList(3);
0262   
0263   selected = get(hPop, <span class="string">'Val'</span>);
0264   set(hPop, <span class="string">'Val'</span>, [1]);
0265   
0266   <span class="keyword">switch</span> selected
0267     <span class="keyword">case</span> 2
0268       <a href="demglm1.html" class="code" title="">demglm1</a>;
0269     <span class="keyword">case</span> 3
0270       <a href="demglm2.html" class="code" title="">demglm2</a>;
0271     <span class="keyword">case</span> 4
0272       <a href="demmlp2.html" class="code" title="">demmlp2</a>;  
0273     <span class="keyword">case</span> 5
0274       <a href="demknn1.html" class="code" title="">demknn1</a>;
0275   <span class="keyword">end</span>
0276     
0277 <span class="keyword">elseif</span> strcmp(action,<span class="string">'popup3'</span>),
0278   
0279   hndlList=get(gcf,<span class="string">'UserData'</span>);
0280   hPop = hndlList(4);
0281   
0282   selected = get(hPop, <span class="string">'Val'</span>);
0283   set(hPop, <span class="string">'Val'</span>, [1]);
0284   
0285   <span class="keyword">switch</span> selected
0286     <span class="keyword">case</span> 2
0287       <a href="demgmm1.html" class="code" title="">demgmm1</a>;
0288     <span class="keyword">case</span> 3
0289       <a href="demgmm2.html" class="code" title="">demgmm2</a>;
0290     <span class="keyword">case</span> 4
0291       <a href="demgmm3.html" class="code" title="">demgmm3</a>;
0292     <span class="keyword">case</span> 5
0293       <a href="demgmm4.html" class="code" title="">demgmm4</a>;
0294     <span class="keyword">case</span> 6
0295       <a href="demns1.html" class="code" title="">demns1</a>;
0296     <span class="keyword">case</span> 7
0297       <a href="demgtm1.html" class="code" title="">demgtm1</a>;
0298     <span class="keyword">case</span> 8
0299       <a href="demgtm2.html" class="code" title="">demgtm2</a>;
0300     <span class="keyword">case</span> 9
0301       <a href="demkmn1.html" class="code" title="">demkmn1</a>;
0302     <span class="keyword">case</span> 10
0303       <a href="demsom1.html" class="code" title="">demsom1</a>;
0304   <span class="keyword">end</span>
0305   
0306 <span class="keyword">elseif</span> strcmp(action,<span class="string">'popup4'</span>),
0307   
0308   hndlList=get(gcf,<span class="string">'UserData'</span>);
0309   hPop = hndlList(5);
0310   
0311   selected = get(hPop, <span class="string">'Val'</span>);
0312   set(hPop, <span class="string">'Val'</span>, [1]);
0313   
0314   <span class="keyword">switch</span> selected
0315     <span class="keyword">case</span> 2
0316       <a href="demprior.html" class="code" title="function demprior(action);">demprior</a>;
0317     <span class="keyword">case</span> 3
0318       <a href="demev1.html" class="code" title="">demev1</a>;
0319   <span class="keyword">case</span> 4
0320       <a href="demev3.html" class="code" title="">demev3</a>;
0321   <span class="keyword">case</span> 5
0322       <a href="demev2.html" class="code" title="">demev2</a>;
0323     <span class="keyword">case</span> 6
0324       <a href="demard.html" class="code" title="">demard</a>;
0325     <span class="keyword">case</span> 7
0326       <a href="demprgp.html" class="code" title="function demprgp(action);">demprgp</a>;
0327     <span class="keyword">case</span> 8
0328       <a href="demgp.html" class="code" title="">demgp</a>;
0329     <span class="keyword">case</span> 9
0330       <a href="demgpard.html" class="code" title="">demgpard</a>;
0331   <span class="keyword">end</span>
0332 
0333 <span class="keyword">elseif</span> strcmp(action,<span class="string">'popup5'</span>),
0334   
0335   hndlList=get(gcf,<span class="string">'UserData'</span>);
0336   hPop = hndlList(6);
0337   
0338   selected = get(hPop, <span class="string">'Val'</span>);
0339   set(hPop, <span class="string">'Val'</span>, [1]);
0340   
0341   <span class="keyword">switch</span> selected
0342     <span class="keyword">case</span> 2
0343       <a href="demopt1.html" class="code" title="function demopt1(xinit)">demopt1</a>;
0344     <span class="keyword">case</span> 3
0345       <a href="demolgd1.html" class="code" title="">demolgd1</a>;
0346     <span class="keyword">case</span> 4
0347       <a href="demhint.html" class="code" title="function demhint(nin, nhidden, nout)">demhint</a>;
0348   <span class="keyword">end</span>
0349 
0350   
0351 <span class="keyword">elseif</span> strcmp(action,<span class="string">'popup6'</span>),
0352   
0353   hndlList=get(gcf,<span class="string">'UserData'</span>);
0354   hPop = hndlList(7);
0355   
0356   selected = get(hPop, <span class="string">'Val'</span>);
0357   set(hPop, <span class="string">'Val'</span>, [1]);
0358   
0359   <span class="keyword">switch</span> selected
0360     <span class="keyword">case</span> 2
0361       <a href="demgauss.html" class="code" title="">demgauss</a>;
0362     <span class="keyword">case</span> 3
0363       <a href="demmet1.html" class="code" title="function demmet1(plot_wait)">demmet1</a>;
0364     <span class="keyword">case</span> 4
0365       <a href="demhmc1.html" class="code" title="">demhmc1</a>;
0366     <span class="keyword">case</span> 5
0367       <a href="demhmc2.html" class="code" title="">demhmc2</a>;
0368     <span class="keyword">case</span> 6
0369       <a href="demhmc3.html" class="code" title="">demhmc3</a>;
0370   <span class="keyword">end</span>
0371 
0372 <span class="keyword">elseif</span> strcmp(action, <span class="string">'help'</span>),
0373   
0374   helpStr = {<span class="string">'To run a demo, press the appropriate button.'</span>; <span class="keyword">...</span>
0375     <span class="string">'Instructions and information will appear in the Matlab'</span>;<span class="keyword">...</span>
0376     <span class="string">'command window.'</span>};
0377   
0378   hHelpDlg = helpdlg(helpStr, <span class="string">'Netlab Demo Help'</span>);    
0379 
0380 <span class="keyword">end</span>;</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>